package com.dmap.run.service;

import com.dmap.run.controller.api.param.RidingRecordParam;
import com.dmap.run.controller.api.param.RunRecordParam;
import com.dmap.run.po.RidingRecord;
import com.dmap.run.po.RunRecord;
import com.dmap.run.vo.RidingRecordHistoryVo;
import com.dmap.run.vo.RunRecordHistoryVo;

import java.util.List;

/**
 * \* User: silent
 * \* Date: 08/06/18 Time: 下午 12:00
 * \* Description:
 * \
 */
public interface RidingRecordService {


    boolean insertRidingRecord(RidingRecordParam param);

    /**
     * @return 存在：true ,不存在： false
     */
    boolean isExistRidingRecord(long userId, long startTime, long endTime);

    RidingRecordHistoryVo selectRidingRecordHistoryList(long userId);

    List<RidingRecord> selectRidingRecordListByPage(long userId, int pageIndex, int pageSize);

    RidingRecord selectRidingRecordById(long ridingRecordId);

    /**
     * 获取用户总公里数 ,单位米
     *
     * @param userId
     * @return
     */
    int selectUserTotalDistance(long userId);
}
